home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 5217 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: sundog.tiac.net!champion
  2. From: champion@tiac.net (ChampionSOFT System Solutions)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: SYSTEM CALL in a while loop didn't work
  5. Date: 8 Feb 1996 19:38:01 GMT
  6. Organization: The Internet Access Company
  7. Message-ID: <4fdjep$5so@sundog.tiac.net>
  8. References: <4f53vi$5uo@bcrkh13.bnr.ca>
  9. NNTP-Posting-Host: laraby.tiac.net
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. coopeng (coopeng@bnr.ca) wrote:
  13. : Hi folks,
  14. : I am rubing a 13000 records file in a 3 nested while loop
  15. : eg
  16. :  
  17. : while()
  18. :   while()
  19. :     */first system call */
  20. :     while()/*rubing*/
  21. :       strstr()
  22. :       */second system call */
  23.  
  24. : first system call works, but second doesn't.  If I comment the third while loop then 
  25. : second while loop also works.  I shall be thankful if you guys mail me the 
  26. : solution as soon as possible.
  27.  
  28. You might want to try this on for size: 
  29.  
  30.   while () { 
  31.     while() { 
  32.       /* first system call */
  33.       while() { 
  34.         strstr();
  35.         /* second system call */ 
  36.       }
  37.     }
  38.   }
  39.  
  40. What was happening looks like this
  41.  
  42. while()
  43.   while()
  44.   /* first system call */
  45. /* endwhile */
  46.  
  47. while() 
  48.   strstr
  49. /* endwhile */
  50. /*second system call
  51.